package com.pms.utils;

import java.util.Enumeration;

import javax.servlet.http.HttpServletRequest;


public class Converter {
	
	
	public static ValueObject convertToValueObject(HttpServletRequest request)
	{
		ValueObject valObj = new ValueObject();
		
		if(request != null)
		{
			Enumeration enumParam  = request.getParameterNames();
			while(enumParam.hasMoreElements())
			{
				Object tmpAtt = enumParam.nextElement();
				valObj.put(tmpAtt.toString(),request.getParameter(tmpAtt.toString()));
				System.out.println("@@@@@ key   "+tmpAtt.toString()+" --------- value  "+request.getParameter(tmpAtt.toString()));
				
			}
			
			
		}
		
		return valObj;
	}
	

}
